feat: add jit registry (CM-1299) - #4276
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Routes Maven groupIds with io.github.* / com.github.* prefixes to the JitPack Maven repository (https://jitpack.io) to unblock enrichment for packages that otherwise remain unresolved on Maven Central.
Changes:
- Added
io.githubandcom.githubentries toALTERNATIVE_REGISTRIESto resolve base URL and browse URL via JitPack. - Added unit tests for JitPack base URL resolution, browse URL generation, prefix-boundary behavior, and the bare-prefix edge case.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| services/apps/packages_worker/src/maven/registry.ts | Adds JitPack alternative-registry routing entries for io.github and com.github. |
| services/apps/packages_worker/src/maven/tests/registry.test.ts | Adds tests validating the new JitPack routing and URL generation behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+102
to
+106
| // JitPack builds and serves artifacts directly from GitHub/GitLab/Bitbucket source repos. | ||
| // The io.github.<username> and com.github.<username> groupId conventions are JitPack-specific | ||
| // and will never resolve on Maven Central. | ||
| { | ||
| prefix: 'io.github', |
Comment on lines
+152
to
+158
| it('returns JitPack for io.github namespace', () => { | ||
| expect(resolveRegistryBaseUrl('io.github.resilience4j')).toBe('https://jitpack.io') | ||
| }) | ||
|
|
||
| it('returns JitPack for bare io.github (exact match)', () => { | ||
| expect(resolveRegistryBaseUrl('io.github')).toBe('https://jitpack.io') | ||
| }) |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 505c0dc. Configure here.
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
ulemons
force-pushed
the
fix/add-jitPack-registry
branch
from
June 30, 2026 09:52
c444c4e to
dfdf999
Compare
skwowet
pushed a commit
that referenced
this pull request
Jul 3, 2026
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org> Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Routes
io.github.*andcom.github.*Maven packages to JitPack instead of Maven Central. These packages follow JitPack's groupId convention (GitHub username as sub-namespace) and will never resolve on Central, causing ~649 packages to be permanently stuck asmaven_not_on_central. With this change the enrichment loop fetches their metadata and POM fromhttps://jitpack.io, which exposes the same standard Maven repository layout.Changes
registry.ts— adds two entries toALTERNATIVE_REGISTRIESforio.githubandcom.githubprefixes pointing to JitPack (https://jitpack.io). ThepageUrllambda usesstartsWith/slicerather thanString.replaceto avoid leaving the prefix in the URL when the groupId matches the bare prefix exactly.registry.test.ts— adds 7 tests covering base URL resolution, page URL generation, prefix-boundary guard (io.githubfoomust not match), and the bare-prefix edge case.Type of change
JIRA ticket
CM-1299
Note
Medium Risk
Changes external registry resolution and error handling for many Maven packages; misclassification of 401 is scoped to JitPack URLs only, but extra fallback HTTP calls add load and could mask rare edge cases.
Overview
Maven enrichment now tries Maven Central first for
io.github.*andcom.github.*(many artifacts live on Central), then falls back to JitPack when metadata isNOT_FOUND. A further Gradle Plugin Portal fallback runs for any still-missing package (except when GPP is already the primary registry forgradle.plugin.*).Registry helpers add
isJitpackNamespace,jitpackPageUrl, and shared base URL constants; browse URLs from the resolved fetch base now cover GPP and JitPack paths. Metadata fetch treats JitPack 401 as not-found (JitPack-only), so missing public builds do not look like auth errors.Tests cover Central-as-primary for GitHub-style groupIds, fallback page URLs, namespace boundary checks, and JitPack URL shaping.
Reviewed by Cursor Bugbot for commit dfdf999. Bugbot is set up for automated code reviews on this repo. Configure here.